import movies from './movie'

export function getMovies() {
    return movies.subjects.map(item => {
        return { ...item, liked: false}
    })
}

export function getMoviesByGenre(genre) {
    return movies.subjects.filter(item => {
        return item.genres.includes(genre)
    })
}

export function getMovie(id) {
    return movies.subjects.find(m => m._id === id)
}
